package com.tengfei.main.system.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.tengfei.common.annotation.ExcelDictFormat;
import com.tengfei.common.convert.ExcelDictConvert;
import com.tengfei.common.utils.poi.select.ExcelSelected;
import com.tengfei.main.user.service.select.DeptSelectList;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户对象导入VO
 *
 * @author Lion Li
 */

@Data
@NoArgsConstructor
// @Accessors(chain = true) // 导入不允许使用 会找不到set方法
public class SysUserImportVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 部门
     */
    @ExcelProperty(value = "部门(必填)", index = 0)
    @ExcelSelected(sourceClass = DeptSelectList.class)
    private String deptName;

    /**
     * 用户名
     */
    @ExcelProperty(value = "用户名(选填,非中文,唯一)")
    private String userName;

    /**
     * 用户性别
     */
    @ExcelProperty(value = "性别(选填)",converter = ExcelDictConvert.class,index = 2)
    @ExcelDictFormat(dictType = "sys_user_sex")
    @ExcelSelected(source = {"男", "女", "保密"})
    private Integer sex;

    /**
     * 姓名
     */
    @ExcelProperty(value = "姓名(必填)")
    private String name;

    /**
     * 手机号码
     */
    @ExcelProperty(value = "手机号码(必填,唯一)")
    private String phonenumber;


}
